<script type="text/javascript">
    function validateSn(){
        var sn1 = document.getElementById('snId1');
        var sn2 = document.getElementById('snId2');
        if(sn1.value>=sn2.value){
            sn1.value = '';
            sn2.value = '';
            sn1.focus();
            alertMsg.error('起始SN必须小于截止SN！');
        }else if(sn2.value-sn1.value>=500){
            sn1.value = '';
            sn2.value = '';
            sn1.focus();
            alertMsg.error('一次批量添加最多不得超过500条数据！');
        }
    };
</script>
<div class="pageContent">
    <form method="post" action="batchAddPa" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
        <div class="pageFormContent" layoutH="56">
            <p>
                <label>起始PN：</label>
                <input name="paSn1" id="snId1" type="text" size="30" class="digits required textInput" alt="请输入数字" value=""/>
            </p>
            <p>
                <label>截止PN：</label>
                <input name="paSn2" id="snId2" type="text" size="30" class="digits required textInput" alt="请输入数字" value="" onblur="validateSn();"/>
            </p>
            <p>
                <label>组件名称：</label>
                <input name="paName" class="required" type="text" size="30" alt="请输入产品名称"/>
            </p>
            <p>
                <label>型  号：</label>
                <input type="text" value="" class="required" name="paType" class="textInput">
            </p>
            <p>
                <label>版本号：</label>
                <input name="paVa" type="text" size="30"/>
            </p>
            <p>
                <label>生产日期：</label>
                <input type="text" name="paData" class="date required textInput" size="30" /><a class="inputDateButton" href="javascript:;">选择</a>
            </p>
            <p>
                <label>生产商信息：</label>
                <input type="text" size="30" name="paMi"/>
            </p>
            <p>
                <label>批  次：</label>
                <input name="paBn" class="digits" type="text" size="30" alt="请输入数字"/>
            </p>
            <p>
                <label>生产地：</label>
                <input type="text" size="30" name="paPa"/>
            </p>
            <p>
                <label>发往地：</label>
                <input type="text" size="30" name="paDs"/>
            </p>
            <p>
                <label>状  态：</label>
                <select name="paState" class="required combox">
                    <option value="">请选择</option>
                    <option value="0" selected>未使用</option>
                    <option value="1">使用</option>
                    <option value="2">维修中</option>
                </select>
            </p>
        </div>
        <div class="formBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
                <li>
                    <div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
                </li>
            </ul>
        </div>
    </form>
</div>